package com.wn.bean;

import lombok.Data;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author yellow Docter
 * @date 2022 -07-06
 * @desc
 */
@Data
@Component("stu")
public class Student {

    private String name;

    // byType 进行注入
    /**
     * 如果 给 @Resource  类型注入
     * 如果 给 @Resource(name = "mySchool")   名字注入
     */
    @Resource(name = "mySchool")
    private School school;

}
